'use static'
module.exports={
    origin:function(ctx){
        const whiteList=['localhost:3000'];
        let url=ctx.header.host;
        if(whiteList.includes(url)){
            return url;
        }

        return 'http://localhost:3000'
    },
    maxAge:5,
    credentials:true,
    allowMethods:['GET','POST','PUT','OPTIONS','DELETE'],
    allowHeaders: ['Content-Type', 'Authorization', 'Accept'],
    exposeHeaders: ['WWW-Authenticate', 'Server-Authorization']

}